import request from "@/utils/request";
// 切换路由页面无法实时切换，导致还是走之前的URL 1.路由守卫刷新  2.直接使用统一baseurl管理
import baseUrl from "@/utils/requestBase";

//查询所有订单信息
export function getOrderList(data){
	return request({
		url:"/list",
		method:"get",
		baseURL:`${baseUrl.order}`,
		params:data,
	});
}

export function searchById(data){
	return request({
		url:"/searchByOrderId",
		method:"get",
		baseURL:`${baseUrl.order}`,
		params:data,
	});
}

export function search(data){
	return request({
		url:"/search",
		method:"get",
		baseURL:`${baseUrl.order}`,
		params:data,
	})
}

export function insert(data){
	return request({
		url:"/insert",
		method:"post",
		baseURL:`${baseUrl.order}`,
		data,
	})
}

export function update(data){
	return request({
		url:"/update",
		method:"post",
		baseURL:`${baseUrl.order}`,
		data,
	})
}